const db = require("../../db")
// 获取评论列表
exports.getComments = (req,res)=>{
    const id = req.body.id
    var str = "select c.* from comments c join question q on q.id = ? and c.t_id = ? order by c.pubdata desc"
    db.query(str,[id,id],(err,results)=>{
        if(err) return res.cc(err)

        res.send({
            status:0,
            message:"获取成功",
            data:results
        })
    })
}